function varargout = FilterDesignGUI2(varargin)
% FILTERDESIGNGUI2 MATLAB code for FilterDesignGUI2.fig
%      FILTERDESIGNGUI2, by itself, creates a new FILTERDESIGNGUI2 or raises the existing
%      singleton*.
%
%      H = FILTERDESIGNGUI2 returns the handle to a new FILTERDESIGNGUI2 or the handle to
%      the existing singleton*.
%
%      FILTERDESIGNGUI2('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in FILTERDESIGNGUI2.M with the given input arguments.
%
%      FILTERDESIGNGUI2('Property','Value',...) creates a new FILTERDESIGNGUI2 or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before FilterDesignGUI2_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to FilterDesignGUI2_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help FilterDesignGUI2

% Last Modified by GUIDE v2.5 07-Nov-2013 06:40:46

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @FilterDesignGUI2_OpeningFcn, ...
                   'gui_OutputFcn',  @FilterDesignGUI2_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before FilterDesignGUI2 is made visible.
function FilterDesignGUI2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to FilterDesignGUI2 (see VARARGIN)

% Choose default command line output for FilterDesignGUI2
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes FilterDesignGUI2 wait for user response (see UIRESUME)
% uiwait(handles.mainMenu);


% --- Outputs from this function are returned to the command line.
function varargout = FilterDesignGUI2_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on selection change in polesList.
function polesList_Callback(hObject, eventdata, handles)
% hObject    handle to polesList (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns polesList contents as cell array
%        contents{get(hObject,'Value')} returns selected item from polesList


% --- Executes during object creation, after setting all properties.
function polesList_CreateFcn(hObject, eventdata, handles)
% hObject    handle to polesList (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in zerosList.
function zerosList_Callback(hObject, eventdata, handles)
% hObject    handle to zerosList (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns zerosList contents as cell array
%        contents{get(hObject,'Value')} returns selected item from zerosList


% --- Executes during object creation, after setting all properties.
function zerosList_CreateFcn(hObject, eventdata, handles)
% hObject    handle to zerosList (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in zoomInBut.
function zoomInBut_Callback(hObject, eventdata, handles)
% hObject    handle to zoomInBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in panBut.
function panBut_Callback(hObject, eventdata, handles)
% hObject    handle to panBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in cursorBut.
function cursorBut_Callback(hObject, eventdata, handles)
% hObject    handle to cursorBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in togglebutton4.
function togglebutton4_Callback(hObject, eventdata, handles)
% hObject    handle to togglebutton4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of togglebutton4


% --- Executes on button press in gridToggle.
function gridToggle_Callback(hObject, eventdata, handles)
% hObject    handle to gridToggle (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of gridToggle


% --- Executes on button press in logLinToggle.
function logLinToggle_Callback(hObject, eventdata, handles)
% hObject    handle to logLinToggle (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of logLinToggle


% --- Executes on button press in hzRadToggle.
function hzRadToggle_Callback(hObject, eventdata, handles)
% hObject    handle to hzRadToggle (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of hzRadToggle


% --- Executes on button press in backStageBut.
function backStageBut_Callback(hObject, eventdata, handles)
% hObject    handle to backStageBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in leftStagesBut.
function leftStagesBut_Callback(hObject, eventdata, handles)
% hObject    handle to leftStagesBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in rightStagesBut.
function rightStagesBut_Callback(hObject, eventdata, handles)
% hObject    handle to rightStagesBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in createStageBut.
function createStageBut_Callback(hObject, eventdata, handles)
% hObject    handle to createStageBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in autoPoleZeroBut.
function autoPoleZeroBut_Callback(hObject, eventdata, handles)
% hObject    handle to autoPoleZeroBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in individualBut.
function individualBut_Callback(hObject, eventdata, handles)
% hObject    handle to individualBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in acumulativeBut.
function acumulativeBut_Callback(hObject, eventdata, handles)
% hObject    handle to acumulativeBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in superposeBut.
function superposeBut_Callback(hObject, eventdata, handles)
% hObject    handle to superposeBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in designFilterBut.
function designFilterBut_Callback(hObject, eventdata, handles)
% hObject    handle to designFilterBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of designFilterBut


% --- Executes on button press in shiftRightBut.
function shiftRightBut_Callback(hObject, eventdata, handles)
% hObject    handle to shiftRightBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of shiftRightBut


% --- Executes on button press in autoCascadeBut.
function autoCascadeBut_Callback(hObject, eventdata, handles)
% hObject    handle to autoCascadeBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of autoCascadeBut



function Gi_Callback(hObject, eventdata, handles)
% hObject    handle to Gi (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of Gi as text
%        str2double(get(hObject,'String')) returns contents of Gi as a double


% --- Executes during object creation, after setting all properties.
function Gi_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Gi (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in backStageBut.
function togglebutton18_Callback(hObject, eventdata, handles)
% hObject    handle to backStageBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of backStageBut


% --- Executes on button press in deleteStageBut.
function deleteStageBut_Callback(hObject, eventdata, handles)
% hObject    handle to deleteStageBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of deleteStageBut


% --- Executes on selection change in signalLevelMenu.
function signalLevelMenu_Callback(hObject, eventdata, handles)
% hObject    handle to signalLevelMenu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns signalLevelMenu contents as cell array
%        contents{get(hObject,'Value')} returns selected item from signalLevelMenu


% --- Executes during object creation, after setting all properties.
function signalLevelMenu_CreateFcn(hObject, eventdata, handles)
% hObject    handle to signalLevelMenu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit2_Callback(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit2 as text
%        str2double(get(hObject,'String')) returns contents of edit2 as a double


% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- If Enable == 'on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over polesList.
function polesList_ButtonDownFcn(hObject, eventdata, handles)
% hObject    handle to polesList (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in attenPassBut.
function attenPassBut_Callback(hObject, eventdata, handles)
% hObject    handle to attenPassBut (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of attenPassBut


% --- Executes on button press in GiTxt.
function GiTxt_Callback(hObject, eventdata, handles)
% hObject    handle to GiTxt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in QTxt.
function QTxt_Callback(hObject, eventdata, handles)
% hObject    handle to QTxt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton23.
function pushbutton23_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton23 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in F0Txt.
function F0Txt_Callback(hObject, eventdata, handles)
% hObject    handle to F0Txt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton25.
function pushbutton25_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton25 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)



function vmin_Callback(hObject, eventdata, handles)
% hObject    handle to vmin (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of vmin as text
%        str2double(get(hObject,'String')) returns contents of vmin as a double


% --- Executes during object creation, after setting all properties.
function vmin_CreateFcn(hObject, eventdata, handles)
% hObject    handle to vmin (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function edit4_Callback(hObject, eventdata, handles)
% hObject    handle to vmax (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of vmax as text
%        str2double(get(hObject,'String')) returns contents of vmax as a double


% --- Executes during object creation, after setting all properties.
function vmax_CreateFcn(hObject, eventdata, handles)
% hObject    handle to vmax (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in VmTxt.
function VmTxt_Callback(hObject, eventdata, handles)
% hObject    handle to VmTxt (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in vmax.
function vmax_Callback(hObject, eventdata, handles)
% hObject    handle to vmax (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)



function vmax2_Callback(hObject, eventdata, handles)
% hObject    handle to vmax2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of vmax2 as text
%        str2double(get(hObject,'String')) returns contents of vmax2 as a double


% --- Executes during object creation, after setting all properties.
function vmax2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to vmax2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end
